<?php
include_once('./header.php');
$res = select($config,'article','where cid='.$_GET['cid']);
// var_dump($res);die;
?>
</head>
<body>
	
	<!-- SITE WRAPPER -->
	<div id="wrapper">
	
		<!-- PAGE WITH CONTENTS -->
		<div id="page">
			<div id="content">
			
				
				<h1><?php echo $_GET['title']; ?></h1>
				
				<div class="hr"></div>
				
				<!-- BLOG POSTS WITH SMALL THUMBS -->
				<ul id="blog-small">
					<?php
						foreach($res as $k=>$v){
					?>		
					<li> 
						<div class="blog-small-image">
							<span style="background-image: url('/public/upload/<?php echo $v['pic'] ?>');" class="imghover_small_blog"></span>
						</div>				
						<div class="blog-small-text">
							<h1><?php echo $v['title'] ?></h1>

							<p class="blog-info">&nbsp;<img src="/public/images/icon-time.png" alt="" />&nbsp;<?php echo date('M d,Y',$v['ctime']); ?>&nbsp; 
								<img src="/public/images/sep.gif" alt="" />&nbsp;&nbsp;<img src="/public/images/icon-category.png" alt="" /><?php echo $v['title'] ?>&nbsp;&nbsp;<img src="/public/images/sep.gif" alt="" />&nbsp;&nbsp;
								<img src="/public/images/icon-comment.png" alt="" />&nbsp;0 Comment(s)
							</p>
							
							<p class="blog-small-excerpt"><?php echo htmlentities(mb_substr($v['content'],0,157,'utf-8'));?> <br /><a href="./articledetail.php?id=<?php echo $v['id'] ?>" class="read_more">阅读全文 &rarr;</a></p>						
						</div>
					</li>				
					<!-- POST SEPARATOR -->
					<li class="blog-small-sep"></li>
					<?php
						}
					?>
				</ul><!-- #blog-small ends -->
			
				<div class="hr"></div>
			
			</div><!-- #content ends -->	
		</div><!-- #page ends -->
			
		
		<!-- SIDEBAR -->
		<?php include_once('./public/public.php') ?>	
			
		</div><!-- #sidebar ends -->			
					
	</div><!-- #wrapper ends -->

	
	<!-- BACKGROUND SLIDER -->
	<div id="bg_slider">	
		<img src="/public/images/bgslider-1.jpg" alt="" />
		<img src="/public/images/bgslider-2.jpg" alt="" />
		<img src="/public/images/bgslider-3.jpg" alt="" />
	</div>


</body>
</html>